#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>

#define LED_R	56
#define LED_G	57
#define LED_B	58

int main(void)
{
	rt_pin_mode(LED_R, PIN_MODE_OUTPUT);
	rt_pin_mode(LED_G, PIN_MODE_OUTPUT);
	rt_pin_mode(LED_B, PIN_MODE_OUTPUT);

	while (1) {
		rt_pin_write(LED_R, 1);
		rt_pin_write(LED_G, 0);
		rt_pin_write(LED_B, 0);
		rt_thread_mdelay(2000);

		rt_pin_write(LED_R, 0);
		rt_pin_write(LED_G, 1);
		rt_pin_write(LED_B, 0);
		rt_thread_mdelay(2000);

		rt_pin_write(LED_R, 0);
		rt_pin_write(LED_G, 0);
		rt_pin_write(LED_B, 1);
		rt_thread_mdelay(2000);

		rt_pin_write(LED_R, 1);
		rt_pin_write(LED_G, 1);
		rt_pin_write(LED_B, 1);
		rt_thread_mdelay(2000);
	}
    return RT_EOK;
}
